package com.hp.jus.run;

import java.net.URL;

import com.hp.jus.JusFactory;
import com.hp.jus.Jusser;

public class Runner {
	public static void main(String[] args)throws Exception {
		
		long now1 = System.currentTimeMillis();
		
		String urlStr = "http://www.paulmccartney.com/web/guest/collection-items?p_p_id=collectionitems_WAR_Collectionsportlet_INSTANCE_w8MD&p_p_lifecycle=0&p_p_state=normal&p_p_mode=view&p_p_col_id=column-1&p_p_col_pos=1&p_p_col_count=2&p_r_p_564233524_tag=collection-on+the+run&p_r_p_564233524_articleId=3411508&#p_collectionitems_WAR_Collectionsportlet_INSTANCE_w8MD";
		URL url = new URL(urlStr);
		Jusser jusser = JusFactory.getInstance();
		String d;
		for(int i=0; i<100000; i++){
			d = jusser.addAndgetSURL(url);
			//if(i%1000==0)
			//System.out.println(i+"-"+d);
		}
		
		//System.out.println(jusser.get("zXX1rx1Z"));
		
		jusser.close();
		long now2 = System.currentTimeMillis();
		System.out.println(now2-now1);
		//jusser.remove("8ZTB8VEP7RVL");
		//System.out.println(jusser.update("encpFrOdRam5", new URL("http://www.allauakbar.com/test")));
	}
}
